package com.demo.ui;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.List;
import java.util.Objects;


public class Cascader {
    private String label;
    private String value;
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Cascader> children;
    public String getLabel() {
        return label;
    }

    public Cascader(String label, String value) {
        this.label = label;
        this.value = value;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public List<Cascader> getChildren() {
        return children;
    }

    public void setChildren(List<Cascader> children) {
        this.children = children;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Cascader cascader = (Cascader) o;
        return Objects.equals(label, cascader.label);
    }

    @Override
    public int hashCode() {
        return Objects.hash(label);
    }
}
